package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_user_activity", catalog = "db_lemon3d")
public class TbUserActivity implements java.io.Serializable {

	/** 
	 * ��̬id.
	 */

	private Integer activityId;

	/** 
	 * �û�id.
	 */

	private TbUser tbUser;

	/** 
	 * ���ͣ�1Ϊ�û����飬2Ϊ�û�������������Ʒ����ע��Ʒ�ȵȣ�.
	 */

	private int activityType;

	/** 
	 * ��̬����.
	 */

	private String activityContent;

	/** 
	 * ����ʱ��.
	 */

	private Date activityTime;

	public TbUserActivity() {
	}

	public TbUserActivity(TbUser tbUser, int activityType,
			String activityContent, Date activityTime) {
		setTbUser(tbUser);
		setActivityType(activityType);
		setActivityContent(activityContent);
		setActivityTime(activityTime);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "activity_id", unique = true, nullable = false)
	public Integer getActivityId() {
		return this.activityId;
	}

	public void setActivityId(Integer activityId) {
		this.activityId = activityId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public TbUser getTbUser() {
		return this.tbUser;
	}

	public void setTbUser(TbUser tbUser) {
		this.tbUser = tbUser;
	}

	@Column(name = "activity_type", nullable = false)
	public int getActivityType() {
		return this.activityType;
	}

	public void setActivityType(int activityType) {
		this.activityType = activityType;
	}

	@Column(name = "activity_content", nullable = false, length = 300)
	public String getActivityContent() {
		return this.activityContent;
	}

	public void setActivityContent(String activityContent) {
		this.activityContent = activityContent;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "activity_time", nullable = false, length = 19)
	public Date getActivityTime() {
		return this.activityTime;
	}

	public void setActivityTime(Date activityTime) {
		this.activityTime = activityTime;
	}

}
